package principle.factory.order;

import principle.factory.simple.BJcheesePizza;
import principle.factory.simple.BJgreekPizza;
import principle.factory.simple.pizza;

/**
 * @author malguy-wang sir
 * @create ${year}-${month}-${day}-${time}
 */
public class BJorderPizza extends orderPizza {
    @Override
    public principle.factory.simple.pizza createPizza(String o) {
        principle.factory.simple.pizza pizza = null;
        if(o.equals("cheese")) return new BJcheesePizza();
        if(o.equals("greek"))  return new BJgreekPizza();
        return pizza;
    }
}
